
import 'package:Smart/pages/productor004/project/bluetooth/pop_up_windows/gs_popup_window.dart';
import 'package:flutter/material.dart';

import 'package:Smart/utils/screen_unit/gs_screen_util.dart';

import 'activate_bluetooth/gs_aactivate_widget.dart';
import 'activate_bluetooth/gs_get_permission.dart';
//点击弹窗页面
class GsMyBluttoothPage extends StatefulWidget {
  GsMyBluttoothPage({Key key}) : super(key: key);
  @override
  _GsMyBluttoothPageState createState() => _GsMyBluttoothPageState();
}

class _GsMyBluttoothPageState extends State<GsMyBluttoothPage> {


  @override
  Widget build(BuildContext context) {

    return Scaffold(
        appBar: AppBar(title: Text('弹窗'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              RaisedButton(
                elevation: 0, //值越大，阴影越重
                shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(50),
                    side: BorderSide(color: Color(0xffD1E000))
                ),
                color: Colors.white,
                child: Text(
                  '底部弹窗',
                  style: TextStyle(
                    color: Color(0xff141413),
                    fontSize: 20.sp,
                  ),
                ),
                onPressed: () {
                  showModalBottomSheet(
                      backgroundColor: Colors.transparent,
                      context: context,
                      builder: (BuildContext context) {
                        return GsPopupWindow();
                      });

                },
              ),
              RaisedButton(
                elevation: 0, //值越大，阴影越重
                shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(50),
                    side: BorderSide(color: Color(0xffD1E000))
                ),
                color: Colors.white,
                child: Text(
                  '文字激活弹窗',
                  style: TextStyle(
                    color: Color(0xff141413),
                    fontSize: 20.sp,
                  ),
                ),
                onPressed: () {
                  showModalBottomSheet(
                      backgroundColor: Colors.transparent,
                      context: context,
                      builder: (BuildContext context) {
                        return GsGetPermission();
                      });

                },
              ),
              RaisedButton(
                elevation: 0, //值越大，阴影越重
                shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(50),
                    side: BorderSide(color: Color(0xffD1E000))
                ),
                color: Colors.white,
                child: Text(
                  '带图片的激活页面',
                  style: TextStyle(
                    color: Color(0xff141413),
                    fontSize: 20.sp,
                  ),
                ),
                onPressed: () {
                  showModalBottomSheet(
                      backgroundColor: Colors.transparent,
                      context: context,
                      builder: (BuildContext context) {
                        return GsActivateWidget();
                      });

                },
              ),
            ],
          ),
        )
    );
  }

}
